﻿-- =============================================
-- Author:		AmirHossein Javan
-- Create date: 1390/1/24
-- Description:	...
-- =============================================
CREATE PROCEDURE [dbo].[uspPayAndReceiveDeleteByField]
	@fieldName nvarchar(100),
	@value nvarchar(1000)
	

AS
BEGIN
	SET NOCOUNT ON;

	DECLARE @query nvarchar(2000)
	SET @query = 'DELETE FROM [PayAndReceive] WHERE [' + @FieldName + '] = ''' + @value + ''''
	EXEC(@query)
END